Class NeoForgeRegionEvent.Rename
java.lang.Object
net.neoforged.bus.api.Event
de.z0rdak.yawp.platform.event.NeoForgeRegionEvent
de.z0rdak.yawp.platform.event.NeoForgeRegionEvent.Rename
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
NeoForgeRegionEvent
This event is fired whenever a new region is renamed. This event is cancelable.
When this is event is canceled, the region will not be renamed.
-
Nested Class Summary
Nested classes/interfaces inherited from class NeoForgeRegionEvent
NeoForgeRegionEvent.Create, NeoForgeRegionEvent.PlayerEnter, NeoForgeRegionEvent.PlayerLeave, NeoForgeRegionEvent.PlayerMove, NeoForgeRegionEvent.Remove, NeoForgeRegionEvent.Rename, NeoForgeRegionEvent.UpdateArea -
Constructor Summary
ConstructorsConstructorDescriptionRename(RegionEvent.Rename event) Rename(IMarkableRegion region, String oldName, String newName, net.minecraft.server.level.ServerPlayer player) -
Method Summary
Modifier and TypeMethodDescriptionstatic RegionEvent.RenamevoidsetNewName(String newName) The name set here is not validated again.Methods inherited from class NeoForgeRegionEvent
getPlayer, getRegionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
Rename
public Rename(IMarkableRegion region, String oldName, String newName, net.minecraft.server.level.ServerPlayer player) -
Rename
-
-
Method Details
-
asCommonEvent
-
getOldName
-
getNewName
-
setNewName
The name set here is not validated again. Be sure you validate the name before setting it.
Otherwise, you may cause inconsistencies and break your whole region definition.- Parameters:
newName- The new name of the region - be sure to validate it before- See Also:
-