Merge branch 'clans/alpha' of ssh://184.154.0.242:7999/min/Mineplex into clans/beta
This commit is contained in:
commit
467af4b835
@ -53,7 +53,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer;
|
|||||||
|
|
||||||
public class Clans extends JavaPlugin
|
public class Clans extends JavaPlugin
|
||||||
{
|
{
|
||||||
public static final String VERSION = "0.18b";
|
public static final String VERSION = "0.19";
|
||||||
private String WEB_CONFIG = "webServer";
|
private String WEB_CONFIG = "webServer";
|
||||||
|
|
||||||
// Modules
|
// Modules
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package mineplex.game.clans.clans.ban.commands;
|
package mineplex.game.clans.clans.ban.commands;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.command.CommandBase;
|
import mineplex.core.command.CommandBase;
|
||||||
|
@ -211,7 +211,7 @@ public class ClansRegions extends MiniPlugin
|
|||||||
|
|
||||||
if (_manager.getClaimMap().containsKey(chunkStr))
|
if (_manager.getClaimMap().containsKey(chunkStr))
|
||||||
{
|
{
|
||||||
System.out.println("get claim map contains " + chunkStr); // this is really really slowing server startup down. just saying.
|
// System.out.println("get claim map contains " + chunkStr); // this is really really slowing server startup down. just saying.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -41,6 +42,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
import org.bukkit.event.weather.WeatherChangeEvent;
|
import org.bukkit.event.weather.WeatherChangeEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
import org.bukkit.material.Dye;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
@ -485,12 +487,32 @@ public class Gameplay extends MiniPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Recharge.Instance.use(event.getPlayer(), "Place Sapling", 1000, true, false))
|
if (!Recharge.Instance.use(event.getPlayer(), "Place Sapling", 20 * 60 * 1000, true, false))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void blockDispenser(BlockDispenseEvent event)
|
||||||
|
{
|
||||||
|
// Block bonemeal
|
||||||
|
if (event.getItem().getType() == Material.INK_SACK && ((Dye) event.getItem().getData()).getColor() == DyeColor.WHITE)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block flint-and-steal
|
||||||
|
if (event.getItem().getType() == Material.FLINT_AND_STEEL)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.getItem().getType() == Material.FIREWORK_CHARGE)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @EventHandler(priority = EventPriority.LOWEST)
|
// @EventHandler(priority = EventPriority.LOWEST)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package mineplex.game.clans.gameplay.safelog;
|
package mineplex.game.clans.gameplay.safelog;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -49,6 +51,12 @@ public class SafeLog extends MiniPlugin
|
|||||||
isSafeLog = true;
|
isSafeLog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_flying.contains(player.getName()))
|
||||||
|
{
|
||||||
|
_flying.remove(player.getName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSafeLog)
|
if (!isSafeLog)
|
||||||
{
|
{
|
||||||
NPCManager.getInstance().spawnLogoutNpc(player);
|
NPCManager.getInstance().spawnLogoutNpc(player);
|
||||||
@ -93,6 +101,8 @@ public class SafeLog extends MiniPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> _flying = new ArrayList<>();
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerQuit(PlayerQuitEvent event)
|
public void onPlayerQuit(PlayerQuitEvent event)
|
||||||
@ -101,6 +111,16 @@ public class SafeLog extends MiniPlugin
|
|||||||
|
|
||||||
onPlayerQuit(event.getPlayer());
|
onPlayerQuit(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
public void flyCheck(PlayerKickEvent event)
|
||||||
|
{
|
||||||
|
if (event.getPlayer().getItemInHand() != null && event.getPlayer().getItemInHand().getItemMeta() != null && (C.cGold + "Wind Blade").equals(event.getPlayer().getItemInHand().getItemMeta().getDisplayName()))
|
||||||
|
if (event.getReason().contains("flying is not enabled"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
_flying.add(event.getPlayer().getName());
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerKicked(PlayerKickEvent event)
|
public void onPlayerKicked(PlayerKickEvent event)
|
||||||
|
@ -211,15 +211,22 @@ public class NPCManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
CombatLogNPC npc = iterator.next();
|
CombatLogNPC npc = iterator.next();
|
||||||
|
|
||||||
|
if (Bukkit.getPlayer(npc.getPlayerInfo().getPlayerName()) != null)
|
||||||
|
{
|
||||||
|
System.out.println("{NPCMANAGER} ORIGINAL PLAYER ALIVE AND DESPAWNING");
|
||||||
|
npc.despawn();
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
|
||||||
if (!npc.isAlive())
|
if (!npc.isAlive())
|
||||||
{
|
{
|
||||||
System.out.println("NOT ALIVE AND REMOVING");
|
System.out.println("{NPCMANAGER} NOT ALIVE AND REMOVING");
|
||||||
npc.remove();
|
npc.remove();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
else if (npc.getAliveDuation() > COMBAT_LOG_DURATION)
|
else if (npc.getAliveDuation() > COMBAT_LOG_DURATION)
|
||||||
{
|
{
|
||||||
System.out.println("DESPAWNING");
|
System.out.println("{NPCMANAGER} DESPAWNING");
|
||||||
npc.despawn();
|
npc.despawn();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user