mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cea84884fc
@ -2,6 +2,7 @@ package dev.plex.listener.impl;
|
|||||||
|
|
||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.block.BlockExplodeEvent;
|
||||||
import org.bukkit.event.block.BlockFromToEvent;
|
import org.bukkit.event.block.BlockFromToEvent;
|
||||||
import org.bukkit.event.block.BlockRedstoneEvent;
|
import org.bukkit.event.block.BlockRedstoneEvent;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
@ -11,7 +12,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
|||||||
public class TogglesListener extends PlexListener
|
public class TogglesListener extends PlexListener
|
||||||
{
|
{
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockExplode(ExplosionPrimeEvent event)
|
public void onExplosionPrime(ExplosionPrimeEvent event)
|
||||||
{
|
{
|
||||||
if (!plugin.toggles.getBoolean("explosions"))
|
if (!plugin.toggles.getBoolean("explosions"))
|
||||||
{
|
{
|
||||||
@ -20,6 +21,15 @@ public class TogglesListener extends PlexListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockExplode(BlockExplodeEvent event) {
|
||||||
|
if (!plugin.toggles.getBoolean("explosions"))
|
||||||
|
{
|
||||||
|
event.getBlock().breakNaturally();
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onEntityExplode(EntityExplodeEvent event)
|
public void onEntityExplode(EntityExplodeEvent event)
|
||||||
{
|
{
|
||||||
|
@ -262,6 +262,6 @@ public class PlexUtils implements PlexBase
|
|||||||
|
|
||||||
public static String cleanString(String input)
|
public static String cleanString(String input)
|
||||||
{
|
{
|
||||||
return CharMatcher.ascii().retainFrom(input);
|
return CharMatcher.forPredicate(c -> Character.getDirectionality(c) != Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE && Character.getDirectionality(c) != Character.DIRECTIONALITY_RIGHT_TO_LEFT).retainFrom(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user