geforkt von Mirrors/AxiomPaperPlugin
backport1.20.1 #6
@ -1,6 +1,7 @@
|
||||
package com.moulberry.axiom.packet;
|
||||
|
||||
import com.moulberry.axiom.AxiomPaper;
|
||||
import com.moulberry.axiom.integration.plotsquared.PlotSquaredIntegration;
|
||||
import com.moulberry.axiom.world_properties.server.ServerWorldPropertiesRegistry;
|
||||
import com.moulberry.axiom.world_properties.server.ServerWorldPropertyHolder;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@ -23,6 +24,16 @@ public class SetWorldPropertyListener implements PluginMessageListener {
|
||||
return;
|
||||
}
|
||||
|
||||
// Call modify world
|
||||
if (!this.plugin.canModifyWorld(player, player.getWorld())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow on plot worlds
|
||||
if (PlotSquaredIntegration.isPlotWorld(player.getWorld())) {
|
||||
return;
|
||||
}
|
||||
|
||||
FriendlyByteBuf friendlyByteBuf = new FriendlyByteBuf(Unpooled.wrappedBuffer(message));
|
||||
ResourceLocation id = friendlyByteBuf.readResourceLocation();
|
||||
int type = friendlyByteBuf.readVarInt();
|
||||
|
@ -60,7 +60,6 @@ public interface WorldPropertyWidgetType<T> {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
WorldPropertyWidgetType<Void> BUTTON = new WorldPropertyWidgetType<>() {
|
||||
@Override
|
||||
public WorldPropertyDataType<Void> dataType() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren