blob: a8a739ac21899597250dffbf30321389072eefa2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
package com.baitinq.primalmc.events.StaffEvents;
import com.baitinq.primalmc.Main;
import com.baitinq.primalmc.commands.StaffCommand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
public class Events implements Listener {
private static Main plugin;
private static StaffCommand staffcmd;
public Events(Main plugin){
this.plugin = plugin;
}
//@EventHandler
//public void PickupItem(PlayerPickupItemEvent event){
// Player player = event.getPlayer();
//if(plugin.staff.contains(player.getUniqueId())){
//player.setCanPickupItems(false);
//}
// }
public void PlayerInteractEntity(PlayerInteractEntityEvent event){
Player player = event.getPlayer();
//if(plugin.staff.contains(player.getUniqueId())){
event.setCancelled(true);
player.sendMessage("You can not interact while vanished");
}
public void BlockPlace(BlockPlaceEvent event){
Player player = event.getPlayer();
//if(plugin.getStaff().contains(player.getUniqueId()))
event.setCancelled(true);
player.sendMessage("You can not build while vanished");
}
public void BlockBreak(BlockBreakEvent event){
Player player = event.getPlayer();
//if(plugin.staff.contains(player.getUniqueId())){
event.setCancelled(true);
player.sendMessage("You can not build when vanished");
}
}
|