Skip to content

Commit

Permalink
WarpCreateEvent (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertek41 committed Sep 11, 2020
1 parent 45b9688 commit e459c53
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package world.bentobox.warps.listeners;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
Expand All @@ -17,6 +18,7 @@
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.scheduler.BukkitRunnable;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.events.addon.AddonEvent;
import world.bentobox.bentobox.api.events.team.TeamEvent.TeamKickEvent;
import world.bentobox.bentobox.api.events.team.TeamEvent.TeamLeaveEvent;
import world.bentobox.bentobox.api.user.User;
Expand Down Expand Up @@ -226,6 +228,13 @@ private void addSign(SignChangeEvent e, User user, Block b) {
for (int i = 1; i<4; i++) {
e.setLine(i, ChatColor.translateAlternateColorCodes('&', e.getLine(i)));
}

Map<String, Object> keyValues = new HashMap<>();
keyValues.put("eventName", "WarpCreateEvent");
keyValues.put("targetPlayer", user.getUniqueId());
keyValues.put("location", Util.getStringLocation(b.getLocation()));

new AddonEvent().builder().addon(addon).keyValues(keyValues).build();
}
// Else null player
}
Expand Down

0 comments on commit e459c53

Please sign in to comment.