You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
package org.poopki.duckdns.user_db.WorldGuard; |
|
import org.bukkit.Bukkit; |
|
import org.bukkit.event.EventHandler; |
|
import org.bukkit.event.Listener; |
|
import org.bukkit.plugin.java.JavaPlugin; |
|
|
|
import de.netzkronehd.wgregionevents.events.RegionEnterEvent; |
|
import de.netzkronehd.wgregionevents.events.RegionEnteredEvent; |
|
import de.netzkronehd.wgregionevents.events.RegionLeaveEvent; |
|
import de.netzkronehd.wgregionevents.events.RegionLeftEvent; |
|
|
|
public class WGRegionExample implements Listener { |
|
|
|
public static final String PREFIX = "§8[§aWGE-Example§8]§7 "; |
|
|
|
@EventHandler |
|
public void onRegionEnter(RegionEnterEvent e) { |
|
e.getPlayer().sendMessage(PREFIX+"You are entering§e "+e.getRegion().getId()+"§7."); |
|
} |
|
|
|
@EventHandler |
|
public void onRegionEntered(RegionEnteredEvent e) { |
|
e.getPlayer().sendMessage(PREFIX+"You entered§e "+e.getRegion().getId()+"§7."); |
|
} |
|
|
|
@EventHandler |
|
public void onRegionLeave(RegionLeaveEvent e) { |
|
e.getPlayer().sendMessage(PREFIX+"You are leaving§e "+e.getRegion().getId()+"§7."); |
|
} |
|
|
|
@EventHandler |
|
public void onRegionLeft(RegionLeftEvent e) { |
|
e.getPlayer().sendMessage(PREFIX+"You left§e "+e.getRegion().getId()+"§7."); |
|
} |
|
|
|
} |