MegaCraft-API
1.0.5
dotnet add package MegaCraft-API --version 1.0.5
NuGet\Install-Package MegaCraft-API -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MegaCraft-API" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MegaCraft-API --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MegaCraft-API, 1.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MegaCraft-API as a Cake Addin
#addin nuget:?package=MegaCraft-API&version=1.0.5
// Install MegaCraft-API as a Cake Tool
#tool nuget:?package=MegaCraft-API&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MegaCraft-API
API for minecraft server: mc.megacraft.org
Using /mtop wins:
MegaAPILibrary.MegaCraft.API.Mtop.Wins mtopwins = new MegaCraft.API.Mtop.Wins();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.Wins.User user in mtopwins.users)
{
Console.WriteLine("Ник: " + user.name);
Console.WriteLine("Побед: " + MegaAPILibrary.MegaCraft.Utils.IntFormat(user.wins));
Console.WriteLine("");
}
Using /mtop kills:
MegaAPILibrary.MegaCraft.API.Mtop.Kills mtopkills = new MegaCraft.API.Mtop.Kills();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.Kills.User user in mtopkills.users)
{
Console.WriteLine("Ник: " + user.name);
Console.WriteLine("Убийств: " + MegaAPILibrary.MegaCraft.Utils.IntFormat(user.kills));
Console.WriteLine("");
}
Using /mtop losses:
MegaAPILibrary.MegaCraft.API.Mtop.Losses mtoplosses = new MegaCraft.API.Mtop.Losses();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.Losses.User user in mtoplosses.users)
{
Console.WriteLine("Ник: " + user.name);
Console.WriteLine("Проигрышей: " + MegaAPILibrary.MegaCraft.Utils.IntFormat(user.losses));
Console.WriteLine("");
}
Using /mtop deaths:
MegaAPILibrary.MegaCraft.API.Mtop.Deaths mtopdeaths = new MegaCraft.API.Mtop.Deaths();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.Deaths.User user in mtopdeaths.users)
{
Console.WriteLine("Ник: " + user.name);
Console.WriteLine("Смертей: " + MegaAPILibrary.MegaCraft.Utils.IntFormat(user.deaths));
Console.WriteLine("");
}
Using /mtop megacoin:
MegaAPILibrary.MegaCraft.API.Mtop.MegaCoins mtopmegacoins = new MegaCraft.API.Mtop.MegaCoins();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.MegaCoins.User user in mtopmegacoins.users)
{
Console.WriteLine("Ник: " + user.name);
Console.WriteLine("Баланс: " + MegaAPILibrary.MegaCraft.Utils.IntFormat(user.balance));
Console.WriteLine("");
}
Using /mtop clans:
MegaAPILibrary.MegaCraft.API.Mtop.Clans mtopclans = new MegaCraft.API.Mtop.Clans();
foreach (MegaAPILibrary.MegaCraft.API.Mtop.Clans.Clan clan in mtopclans.clans)
{
Console.WriteLine("Название клана: " + MegaAPILibrary.MegaCraft.Utils.RemoveColor(clan.name));
Console.WriteLine("Ранг клана: " + clan.rank);
Console.WriteLine("Владелец клана: " + clan.leader);
Console.WriteLine("");
}
Using user statistic:
MegaAPILibrary.MegaCraft.API.User user = new MegaAPILibrary.MegaCraft.API.User("Neki_play1", true);
if (user.Valid)
{
if (user.license.Lisence)
{
Console.WriteLine("Ник игрока: " + user.realname + " [Лицензия]");
Console.WriteLine("UUID: " + user.license.UUID);
}
else
{
Console.WriteLine("Ник игрока: " + user.realname + " [Пиратка]");
}
if (!string.IsNullOrEmpty(user.staff))
{
Console.WriteLine(user.staff);
}
Console.WriteLine("");
Console.WriteLine("Уровень: " + user.level);
Console.WriteLine("Наиграл: " + user.mtime.Days + "д. " + user.mtime.Hours + "ч. " + user.mtime.Minutes + "м. " + user.mtime.Seconds + "с.");
Console.WriteLine("");
Console.WriteLine("Последный выход с сервера: " + user.lastlogin.Days + "д. " + user.lastlogin.Hours + "ч. " + user.lastlogin.Minutes + "м. " + user.lastlogin.Seconds + "с. назад");
Console.WriteLine("Последний сервер: " + user.lastserver);
Console.WriteLine("");
Console.WriteLine("МегаКойнов: " + MegaCraft.Utils.IntFormat(user.balance));
Console.WriteLine("");
Console.WriteLine("Убийств: " + MegaCraft.Utils.IntFormat(user.kills));
Console.WriteLine("Смертей: " + MegaCraft.Utils.IntFormat(user.deaths));
Console.WriteLine("");
Console.WriteLine("Побед: " + MegaCraft.Utils.IntFormat(user.wins));
Console.WriteLine("Поражений: " + MegaCraft.Utils.IntFormat(user.losse));
Console.WriteLine("");
Console.WriteLine("Донат: " + MegaAPILibrary.MegaCraft.Utils.RemoveColor(user.donate));
Console.WriteLine("Префикс: " + MegaAPILibrary.MegaCraft.Utils.RemoveColor(user.prefix));
if (user.clan.InTheClan)
{
Console.WriteLine("");
Console.WriteLine("Клан: " + MegaAPILibrary.MegaCraft.Utils.RemoveColor(user.clan.Name));
Console.WriteLine("Участников: " + user.clan.Members + "/" + user.clan.MaxMembers);
Console.WriteLine("Счет: " + user.clan.Score);
}
Console.WriteLine("");
Console.WriteLine("Имунитеты: " + user.immune.Standart + ", " + user.immune.MImmune + ", " + user.immune.SImmune);
if (user.ban.Banned)
{
Console.WriteLine("");
Console.WriteLine("Забанен");
Console.WriteLine("Причина бана: " + user.ban.Reason);
Console.WriteLine("Забанил: " + user.ban.By);
Console.WriteLine("Тип бана: " + user.ban.Type);
if (user.ban.BanTime.Days != -1 && user.ban.BanTime.Hours != -1 & user.ban.BanTime.Minutes != -1 && user.ban.BanTime.Seconds != -1)
{
Console.WriteLine("До разбана: " + user.ban.BanTime.Days + "д. " + user.ban.BanTime.Hours + "ч. " + user.ban.BanTime.Minutes + "м. " + user.ban.BanTime.Seconds + "с.");
}
}
}
else
{
Console.WriteLine("Пользователь не найден");
}
Console.ReadLine();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
API bug Fix and new Features