File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
src/main/java/org/geysermc/globallinkserver Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -121,23 +121,26 @@ public void onEnable() {
121
121
world .setGameRule (GameRule .RANDOM_TICK_SPEED , 0 );
122
122
world .setGameRule (GameRule .SHOW_DEATH_MESSAGES , false );
123
123
124
+ // Make nighttime
125
+ world .setTime (18000 );
126
+
124
127
// Other changes
125
128
getServer ().motd (Component .text ("GeyserMC " ).color (NamedTextColor .GREEN )
126
129
.append (Component .text ("Link " ).color (NamedTextColor .AQUA ))
127
130
.append (Component .text ("Server" ).color (NamedTextColor .WHITE )));
128
131
129
132
getServer ().clearRecipes ();
130
-
131
- // Make nighttime
132
- world .setTime (18000 );
133
-
134
133
getServer ().setDefaultGameMode (GameMode .ADVENTURE );
135
134
136
135
LOGGER .info ("Started Global Linking plugin!" );
137
136
}
138
137
139
138
@ EventHandler
140
139
public void onCommands (PlayerCommandSendEvent event ) {
140
+ if (event .getPlayer ().isOp ()) {
141
+ return ;
142
+ }
143
+
141
144
Collection <String > toRemove = new ArrayList <>();
142
145
for (String command : event .getCommands ()) {
143
146
if (command .startsWith ("link" )) {
@@ -251,9 +254,4 @@ public void onServerListPing(PaperServerListPingEvent event) {
251
254
event .setNumPlayers (0 );
252
255
event .setMaxPlayers (1 );
253
256
}
254
-
255
- @ EventHandler
256
- public void onPlayerRecipeDiscover (PlayerRecipeDiscoverEvent event ) {
257
- event .setCancelled (true );
258
- }
259
257
}
You can’t perform that action at this time.
0 commit comments