Java源码示例:org.spongepowered.api.event.game.state.GamePostInitializationEvent

示例1
@Listener
public void onPostInitialization(GamePostInitializationEvent event)
{
    this.update = new VirtualChestPluginUpdate(this);
    this.translation = new VirtualChestTranslation(this);
    this.recordManager = new VirtualChestRecordManager(this);
    this.virtualChestActions = new VirtualChestActions(this);
    this.commandAliases = new VirtualChestCommandAliases(this);
    this.economyManager = new VirtualChestEconomyManager(this);
    this.dispatcher = new VirtualChestInventoryDispatcher(this);
    this.scriptManager = new VirtualChestJavaScriptManager(this);
    this.permissionManager = new VirtualChestPermissionManager(this);
    this.placeholderManager = new VirtualChestPlaceholderManager(this);
    this.virtualChestCommandManager = new VirtualChestCommandManager(this);
    this.actionIntervalManager = new VirtualChestActionIntervalManager(this);

    if (Sponge.getPluginManager().getPlugin("byte-items").isPresent())
    {
        byteItemsService = Sponge.getServiceManager().provide(ByteItemsService.class).get();
    }
}
 
示例2
@Override
public void onPostInit(GamePostInitializationEvent event) {
    CommandsConfig config = UltimateCore.get().getCommandsConfig();
    CommentedConfigurationNode node = config.get();
    boolean modified = false;
    for (Command cmd : UltimateCore.get().getCommandService().getCommands()) {
        CommentedConfigurationNode cmdnode = node.getNode("commands", cmd.getIdentifier());
        if (cmdnode.getNode("cooldown").getValue() == null) {
            modified = true;
            cmdnode.getNode("cooldown").setComment("Time in seconds that a player has to wait between uses of the command. (0 to disable)");
            cmdnode.getNode("cooldown").setValue("0s");
        }
        if (cmdnode.getNode("warmup").getValue() == null) {
            modified = true;
            cmdnode.getNode("warmup").setComment("Time in seconds that a player has to wait before the command is executed. (0 to disable)");
            cmdnode.getNode("warmup").setValue("0s");
        }
    }
    if (modified) {
        config.save(node);
    }
    onReload(null);
    new CommandtimerPermissions();
}
 
示例3
@Listener(order = Order.POST)
public void onPostInit(GamePostInitializationEvent event) {
    Optional<ProviderRegistration<PaginationService>> optService = Sponge.getGame().getServiceManager().getRegistration(PaginationService.class);
    if (optService.isPresent()) {
        PaginationService service = optService.get().getProvider();
        Sponge.getGame().getServiceManager().setProvider(this, PaginationService.class, new TabbedPaginationService(service));
    }
    this.features.load();
}
 
示例4
@Listener
public void onServerPostInitialization(final GamePostInitializationEvent event)
{
    startFactionsRemover();
}
 
示例5
@Listener
public void onServerStart(GamePostInitializationEvent event) {
    try {
        uchat = this;
        this.serv = Sponge.getServer();

        this.logger = new UCLogger(this.serv);
        this.config = new UCConfig(this.factory);
        this.lang = new UCLang();

        //set compat perms
        this.setCompatperms();

        logger.info("Init commands module...");
        this.cmds = new UCCommands(this);

        game.getEventManager().registerListeners(plugin, new UCListener());

        //init other features
        // Jedis
        registerJedis();

        //JDA
        registerJDA(true);

        logger.info("Init API module...");
        this.ucapi = new uChatAPI();

        //register placeholdersapi
        if (Sponge.getPluginManager().getPlugin("placeholderapi").isPresent()) {
            new UCPlaceHoldersRelational(this);
        }

        getLogger().logClear("\n"
                + "&b  _    _ _ _   _                 _        _____ _           _  \n"
                + " | |  | | | | (_)               | |      / ____| |         | |  \n"
                + " | |  | | | |_ _ _ __ ___   __ _| |_ ___| |    | |__   __ _| |_ \n"
                + " | |  | | | __| | '_ ` _ \\ / _` | __/ _ \\ |    | '_ \\ / _` | __|\n"
                + " | |__| | | |_| | | | | | | (_| | ||  __/ |____| | | | (_| | |_ \n"
                + "  \\____/|_|\\__|_|_| |_| |_|\\__,_|\\__\\___|\\_____|_| |_|\\__,_|\\__|\n"
                + "                                                                \n"
                + "&a" + plugin.getName() + " " + plugin.getVersion().get() + " enabled!\n");

    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
示例6
public ModulePostInitializeEvent(Module module, GamePostInitializationEvent event, Cause cause) {
    super(module, cause);
    this.event = event;
}
 
示例7
/**
 * Get the GamePostInitializationEvent when this was called.
 */
public GamePostInitializationEvent getEvent() {
    return event;
}
 
示例8
@Listener
public void onPostInitialization(GamePostInitializationEvent event) {
    getConfiguration().saveConfiguration();
}
 
示例9
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例10
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例11
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例12
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例13
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例14
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例15
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例16
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例17
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例18
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例19
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例20
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例21
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例22
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例23
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例24
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例25
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例26
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例27
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例28
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例29
@Override
public void onPostInit(GamePostInitializationEvent event) {

}
 
示例30
@Override
public void onPostInit(GamePostInitializationEvent event) {

}