mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fix /premium. Fixes #1850
Add ArmorStand to list of wipeable entities Add /whohas clear. Resolves #1836
This commit is contained in:
parent
c10b08df27
commit
9fa4c0662c
@ -12,6 +12,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.AreaEffectCloud;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Boat;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.EnderSignal;
|
||||
@ -58,6 +59,7 @@ public class EntityWiper extends FreedomService
|
||||
wipables.add(Minecart.class);
|
||||
wipables.add(Boat.class);
|
||||
wipables.add(FallingBlock.class);
|
||||
wipables.add(ArmorStand.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,12 +44,14 @@ public class Command_premium extends FreedomCommand
|
||||
{
|
||||
try
|
||||
{
|
||||
final URL getUrl = new URL("https://minecraft.net/haspaid.jsp?user=" + name);
|
||||
final URL getUrl = new URL("http://axis.iaero.me/accstatus?username=" + name + "&format=plain");
|
||||
final URLConnection urlConnection = getUrl.openConnection();
|
||||
// Read the response
|
||||
final BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
|
||||
final String message = ("false".equalsIgnoreCase(in.readLine()) ? ChatColor.RED + "No" : ChatColor.DARK_GREEN + "Yes");
|
||||
in.close();
|
||||
final String message;
|
||||
try ( // Read the response
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())))
|
||||
{
|
||||
message = (!"PREMIUM".equalsIgnoreCase(in.readLine()) ? ChatColor.RED + "No" : ChatColor.DARK_GREEN + "Yes");
|
||||
}
|
||||
|
||||
if (!plugin.isEnabled())
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "See who has a block and optionally smite.", usage = "/<command> <item> [smite]", aliases = "wh")
|
||||
@CommandParameters(description = "See who has a block and optionally clears the item.", usage = "/<command> <item> clear", aliases = "wh")
|
||||
public class Command_whohas extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ public class Command_whohas extends FreedomCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
final boolean doSmite = args.length >= 2 && "smite".equalsIgnoreCase(args[1]);
|
||||
final boolean doClear = args.length >= 2 && "clear".equalsIgnoreCase(args[1]);
|
||||
|
||||
final String materialName = args[0];
|
||||
Material material = Material.matchMaterial(materialName);
|
||||
@ -52,9 +52,9 @@ public class Command_whohas extends FreedomCommand
|
||||
if (player.getInventory().contains(material))
|
||||
{
|
||||
players.add(player.getName());
|
||||
if (doSmite && !plugin.al.isAdmin(player))
|
||||
if (doClear && !plugin.al.isAdmin(player))
|
||||
{
|
||||
Command_smite.smite(player);
|
||||
player.getInventory().remove(material);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user