▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/oaexploits
536
4
Все версииoaexploits 1.3.92

oaexploits 1.3.92

Release1 г. назад

Список изменений

New Features

  • Deop on Leave Toggle:
    • Introduced a new option to toggle the deop on leave feature directly from the main settings GUI.
    • This allows administrators to enable or disable the feature without editing the configuration file manually.
    • Access this setting under the "OaExploits Settings" menu.

Improvements

  • Settings GUI Enhancements:

    • New Option: Added Toggle Deop on Leave to the GUI for easy access and control.
    • Enhanced Feedback: Users now receive chat messages indicating the status of settings when toggled.
    • Sound Effects: Added sound feedback (ENTITY_PLAYER_LEVELUP and BLOCK_NOTE_BLOCK_PLING) for a better user experience when interacting with the GUI.
    • Particle Effects: Added particle effects (HAPPY_VILLAGER) to enhance visual feedback when settings are changed.
  • Configurable Deop on Leave:

    • Added the ability to enable or disable the deop on leave feature through the configuration.
    • Whitelist Feature: Specific players can be whitelisted to avoid being deopped on leave.
    • Teleport Configuration: Players who are deopped can be teleported to a configurable location.
  • Enhanced Admin Alerts and Notifications:

    • Admin Alert Cooldown: Implemented a cooldown period for admin alerts to prevent spam.
    • Clear Notifications: Improved the clarity and detail of notifications for illegal item interactions, movements, and placements.
    • Sound and Particle Effects: Added sound and particle effects to notifications for illegal activities to improve user experience.

Configuration Changes

  • New Configuration Options:
    • deop-on-leave.enabled: Boolean setting to enable or disable the deop on leave feature.
    • deop-on-leave.whitelist.players: List of player names to be exempted from deop on leave.
    • deop-on-leave.teleport: Configurable location settings for teleporting deopped players.
    • messages section updated for more detailed and customizable messages related to illegal item interactions and admin alerts.

Code Changes

  • Added New Handler for Deop on Leave Toggle:

    componentHandlers.put(TOGGLE_DEOP_ON_LEAVE, player -> handleConfigOptionClick("deop-on-leave.enabled", "Deop on Leave", player));
    
  • Improved handleBlockPlace Method:

    private void handleBlockPlace(BlockPlaceEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemInHand();
        Material blockType = event.getBlock().getType();
    
        if (removeIllegalItemsEnabled && (shouldRemoveItem(item) || isIllegalBlock(blockType))) {
            event.setCancelled(true);
            int removedCount = item.getAmount();
            Material itemType = item.getType();
            String itemTypeString = itemType.toString();
            removeItem(item);
            notifyPlayerAndAdmins(player, illegalItemPlacementTitle, illegalItemPlacementSubtitle.replace("%item%", blockType.toString()), itemTypeString);
            plugin.getLogger().info("\u001B[31mRemoved " + removedCount + " illegal items from player " + player.getName());
            checkPlayerInventory(player);
        } else if (isShulkerBox(item) && cleanShulkersOnPlaceEnabled) {
            handleShulkerBoxContents(item);
        }
    }
    
  • Configurable Teleport Location:

    private Optional<Location> getTargetLocation() {
        String worldName = config.getString("deop-on-leave.teleport.world");
        if (worldName == null) {
            plugin.getLogger().warning("World name for deop teleport location is not configured.");
            return Optional.empty();
        }
    
        World world = Bukkit.getWorld(worldName);
        if (world == null) {
            plugin.getLogger().warning("World '" + worldName + "' for deop teleport location does not exist.");
            return Optional.empty();
        }
    
        double x = config.getDouble("deop-on-leave.teleport.x", 0.0);
        double y = config.getDouble("deop-on-leave.teleport.y", 64.0);
        double z = config.getDouble("deop-on-leave.teleport.z", 0.0);
        float yaw = (float) config.getDouble("deop-on-leave.teleport.yaw", 0.0);
        float pitch = (float) config.getDouble("deop-on-leave.teleport.pitch", 0.0);
    
        return Optional.of(new Location(world, x, y, z, yaw, pitch));
    }
    

Bug Fixes

  • Illegal Block Placement:

    • Resolved an issue where illegal blocks could not be placed even when the remove-illegal-items feature was turned off.
    • The plugin now respects the removal-options.remove-illegal-items configuration setting correctly.
  • Inventory Interaction Handling:

    • Improved the handling and feedback for illegal item interactions and movements.
    • Fixed issues where certain interactions were not properly logged or handled, ensuring comprehensive tracking and management of illegal items.

Additional Changes

  • General Code Optimization:
    • Improved the overall readability and maintainability of the codebase.
    • Streamlined event handling and configuration loading processes for better performance and ease of use.

Файлы

oaexploits-1.3.92.jar(2.41 MiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.3.92

Загрузчики

Bukkit
Paper
Purpur
Spigot

Версии игры

1.20–1.21

Загрузок

23

Дата публикации

1 г. назад

Загрузил

ID версии

Главная