Package de.z0rdak.yawp.api.events.region
Class NeoForgeRegionEvent.Rename
java.lang.Object
net.neoforged.bus.api.Event
de.z0rdak.yawp.api.events.region.NeoForgeRegionEvent
de.z0rdak.yawp.api.events.region.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 de.z0rdak.yawp.api.events.region.NeoForgeRegionEvent
NeoForgeRegionEvent.Create, NeoForgeRegionEvent.Remove, NeoForgeRegionEvent.Rename, NeoForgeRegionEvent.UpdateArea -
Constructor Summary
ConstructorsConstructorDescriptionRename(RegionEvent.Rename event) Rename(IMarkableRegion region, String oldName, String newName, net.minecraft.world.entity.player.Player player) -
Method Summary
Modifier and TypeMethodDescriptionstatic RegionEvent.RenamevoidsetNewName(String newName) The name set here is not validated again.Methods inherited from class de.z0rdak.yawp.api.events.region.NeoForgeRegionEvent
getPlayer, getRegionMethods inherited from class java.lang.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.world.entity.player.Player 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:
-