Skip to content

Commit

Permalink
Show all commands to OPs and remove old recipie code
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Jan 17, 2025
1 parent a890709 commit 31e40a9
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,26 @@ public void onEnable() {
world.setGameRule(GameRule.RANDOM_TICK_SPEED, 0);
world.setGameRule(GameRule.SHOW_DEATH_MESSAGES, false);

// Make nighttime
world.setTime(18000);

// Other changes
getServer().motd(Component.text("GeyserMC ").color(NamedTextColor.GREEN)
.append(Component.text("Link ").color(NamedTextColor.AQUA))
.append(Component.text("Server").color(NamedTextColor.WHITE)));

getServer().clearRecipes();

// Make nighttime
world.setTime(18000);

getServer().setDefaultGameMode(GameMode.ADVENTURE);

LOGGER.info("Started Global Linking plugin!");
}

@EventHandler
public void onCommands(PlayerCommandSendEvent event) {
if (event.getPlayer().isOp()) {
return;
}

Collection<String> toRemove = new ArrayList<>();
for (String command : event.getCommands()) {
if (command.startsWith("link")) {
Expand Down Expand Up @@ -251,9 +254,4 @@ public void onServerListPing(PaperServerListPingEvent event) {
event.setNumPlayers(0);
event.setMaxPlayers(1);
}

@EventHandler
public void onPlayerRecipeDiscover(PlayerRecipeDiscoverEvent event) {
event.setCancelled(true);
}
}

0 comments on commit 31e40a9

Please sign in to comment.