player actions
This commit is contained in:
1 parent
dc0dc9e406
commit
50d1d74579
10 files changed
+612
-1057
No files matched your search
@@ -2,48 +2,48 @@ package carpet;
|
||||
|
||||
import carpet.settings.SettingsManager;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
|
||||
public abstract class CarpetExtension
|
||||
public interface CarpetExtension
|
||||
{
|
||||
/**
|
||||
* When game started before world is loaded
|
||||
*/
|
||||
public void onGameStarted() {}
|
||||
default void onGameStarted() {}
|
||||
|
||||
/**
|
||||
* Runs once per loaded world once the World files / gamerules etc are fully loaded
|
||||
* Can be loaded multiple times in SinglePlayer
|
||||
*/
|
||||
public void onServerLoaded(MinecraftServer server) {}
|
||||
default void onServerLoaded(MinecraftServer server) {}
|
||||
|
||||
/**
|
||||
* Runs once per game tick, as a first thing in the tick
|
||||
*/
|
||||
public void onTick(MinecraftServer server) {}
|
||||
default void onTick(MinecraftServer server) {}
|
||||
|
||||
/**
|
||||
* Register your own commands right after vanilla commands are added
|
||||
* If that matters for you
|
||||
*/
|
||||
public void registerCommands(CommandDispatcher<ServerCommandSource> dispatcher) {}
|
||||
default void registerCommands(CommandDispatcher<ServerCommandSource> dispatcher) {}
|
||||
|
||||
/**
|
||||
* Provide your own custom settings manager managed in the same way as base /carpet
|
||||
* command, but separated to its own command as defined in SettingsManager.
|
||||
*/
|
||||
public SettingsManager customSettingsManager() {return null;}
|
||||
default SettingsManager customSettingsManager() {return null;}
|
||||
|
||||
/**
|
||||
* todiddalidoo
|
||||
*/
|
||||
public void onPlayerLoggedIn(PlayerEntity player) {}
|
||||
default void onPlayerLoggedIn(ServerPlayerEntity player) {}
|
||||
|
||||
/**
|
||||
* todiddalidoo
|
||||
*/
|
||||
public void onPlayerLoggedOut(PlayerEntity player) {}
|
||||
default void onPlayerLoggedOut(ServerPlayerEntity player) {}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user