t
This commit is contained in:
parent
5732128d14
commit
349e663fd3
@ -11,6 +11,11 @@
|
|||||||
<option name="name" value="sonatype" />
|
<option name="name" value="sonatype" />
|
||||||
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
|
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="fawe-repo" />
|
||||||
|
<option name="name" value="fawe-repo" />
|
||||||
|
<option name="url" value="https://ci.athion.net/job/FastAsyncWorldEdit/ws/mvn/" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="spigotmc-repo" />
|
<option name="id" value="spigotmc-repo" />
|
||||||
<option name="name" value="spigotmc-repo" />
|
<option name="name" value="spigotmc-repo" />
|
||||||
@ -21,6 +26,11 @@
|
|||||||
<option name="name" value="Maven Central repository" />
|
<option name="name" value="Maven Central repository" />
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="placeholderapi" />
|
||||||
|
<option name="name" value="placeholderapi" />
|
||||||
|
<option name="url" value="https://repo.extendedclip.com/content/repositories/placeholderapi/" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jboss.community" />
|
<option name="id" value="jboss.community" />
|
||||||
<option name="name" value="JBoss Community repository" />
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="Maven: club.frozed.tablist:FrozedTablist:4.0-SNAPSHOT" level="project" />
|
||||||
<orderEntry type="module-library">
|
<orderEntry type="module-library">
|
||||||
<library name="Maven: org.papermc:PaperSpigot:1.8.8-R0.1-SNAPSHOT">
|
<library name="Maven: org.papermc:PaperSpigot:1.8.8-R0.1-SNAPSHOT">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
|
@ -5,7 +5,9 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.*;
|
import org.bukkit.event.block.*;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||||
@ -26,6 +28,7 @@ public class RandomListeners implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
||||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(event.getPlayer().getUniqueId());
|
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(event.getPlayer().getUniqueId());
|
||||||
|
|
||||||
if (playerData.getPlayerState() != PlayerState.PLAYING) {
|
if (playerData.getPlayerState() != PlayerState.PLAYING) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -88,4 +91,13 @@ public class RandomListeners implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
||||||
|
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(event.getEntity().getUniqueId());
|
||||||
|
|
||||||
|
if (playerData.getPlayerState() != PlayerState.PLAYING) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,12 @@ public class WorldListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (block.getType() == Material.BED) {
|
||||||
|
block.getDrops().clear();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
player.getInventory().addItem(block.getDrops().toArray(new ItemStack[0]));
|
player.getInventory().addItem(block.getDrops().toArray(new ItemStack[0]));
|
||||||
game.removePlacedBlock(block);
|
game.removePlacedBlock(block);
|
||||||
block.setType(Material.AIR);
|
block.setType(Material.AIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user