Removed message and socialspy because we now have that with sentinel
This commit is contained in:
@@ -64,16 +64,12 @@ public final class OgreDupeAlias extends JavaPlugin {
|
||||
getCommand("mutechat").setTabCompleter(new MuteChatCommand());
|
||||
getCommand("staffchat").setExecutor(new StaffChatCommand());
|
||||
getCommand("staffchat").setTabCompleter(new StaffChatCommand());
|
||||
getCommand("socialspy").setExecutor(new SocialSpyCommand());
|
||||
getCommand("socialspy").setTabCompleter(new SocialSpyCommand());
|
||||
getCommand("commandspy").setExecutor(new CommandSpyCommand());
|
||||
getCommand("commandspy").setTabCompleter(new CommandSpyCommand());
|
||||
getCommand("recipespy").setExecutor(new RecipeSpyCommand());
|
||||
getCommand("recipespy").setTabCompleter(new RecipeSpyCommand());
|
||||
getCommand("irepair").setExecutor(new IRepairCommand());
|
||||
getCommand("irepair").setTabCompleter(new IRepairCommand());
|
||||
getCommand("message").setExecutor(new MessageCommand());
|
||||
getCommand("message").setTabCompleter(new MessageCommand());
|
||||
getCommand("attackcooldown").setExecutor(new AttackCooldownCommand());
|
||||
getCommand("attackcooldown").setTabCompleter(new AttackCooldownCommand());
|
||||
getCommand("givecustom").setExecutor(new GiveCustomCommand());
|
||||
|
||||
@@ -25,7 +25,6 @@ public class SPBEventListener implements Listener {
|
||||
Projectile proj = e.getEntity();
|
||||
if (proj instanceof Snowball && proj.getShooter() instanceof Player shooter) {
|
||||
Snowball snowball = (Snowball) proj;
|
||||
shooter.sendMessage("Hit a block");
|
||||
if (snowball.getItem().getType() == Material.BLUE_DYE || snowball.getItem().getType() == Material.BLUE_DYE) {
|
||||
shooter.sendMessage("Passed dye check");
|
||||
if (!e.getHitBlock().getType().equals(Material.COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.CHAIN_COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.REPEATING_COMMAND_BLOCK)) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ChatConstraints {
|
||||
}
|
||||
|
||||
public boolean passAllChecks() {
|
||||
return passChatMuted() && passRepeat() && passSwear() && passUnicode() && passSpam();
|
||||
return passChatMuted() && passUnicode() ;
|
||||
}
|
||||
|
||||
public boolean passChatMuted() {
|
||||
|
||||
@@ -27,7 +27,11 @@ public class LaserPointer {
|
||||
switch (a) {
|
||||
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK -> {
|
||||
// Full beam
|
||||
RaycastUtils.raycast(start,rot,30,0.1,(point) -> {
|
||||
Location end = RaycastUtils.raycast(start,rot,60,0.5,(point) -> {
|
||||
return !point.getBlock().isPassable();
|
||||
});
|
||||
Vector rightVec = new Vector(rot.getX(), rot.getY(), rot.getZ());
|
||||
RaycastUtils.raycast(start.clone().add(0,1,0),end,0.1,(point) -> {
|
||||
Particle.DustOptions dust = new Particle.DustOptions(Color.LIME, 0.5F);
|
||||
point.getWorld().spawnParticle(Particle.REDSTONE,point,1,0,0,0,0,dust);
|
||||
return !point.getBlock().getType().equals(Material.AIR);
|
||||
|
||||
@@ -17,35 +17,123 @@ import org.bukkit.util.Vector;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class VoidCharm {
|
||||
public static void handleVoidCharm(PlayerInteractEvent e) {
|
||||
Player p = e.getPlayer();
|
||||
ItemStack stack = e.getItem();
|
||||
Action a = e.getAction();
|
||||
if (ItemUtils.matchDisplay(stack, ItemPresets.VOID_CHARM)) {
|
||||
e.setCancelled(true);
|
||||
switch (a) {
|
||||
case LEFT_CLICK_BLOCK, LEFT_CLICK_AIR -> {
|
||||
//test
|
||||
public
|
||||
class
|
||||
VoidCharm
|
||||
{
|
||||
public
|
||||
static
|
||||
void
|
||||
handleVoidCharm
|
||||
(
|
||||
PlayerInteractEvent e
|
||||
) {
|
||||
Player
|
||||
p =
|
||||
e.getPlayer();
|
||||
ItemStack
|
||||
stack =
|
||||
e.getItem();
|
||||
Action
|
||||
a =
|
||||
e.getAction();
|
||||
if
|
||||
(
|
||||
ItemUtils.matchDisplay
|
||||
(
|
||||
stack,
|
||||
ItemPresets.VOID_CHARM
|
||||
)
|
||||
)
|
||||
{
|
||||
e.setCancelled
|
||||
(
|
||||
true
|
||||
);
|
||||
switch
|
||||
(
|
||||
a
|
||||
)
|
||||
{
|
||||
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK
|
||||
-> {
|
||||
Location
|
||||
start =
|
||||
p.getEyeLocation();
|
||||
Vector
|
||||
rot =
|
||||
p.getLocation()
|
||||
.getDirection()
|
||||
.normalize();
|
||||
SoundPlayer
|
||||
throwSound =
|
||||
new
|
||||
SoundPlayer
|
||||
(
|
||||
p.getLocation(),
|
||||
Sound.ITEM_TRIDENT_RIPTIDE_3,
|
||||
1,
|
||||
0.4F
|
||||
);
|
||||
throwSound.
|
||||
playWithin
|
||||
(
|
||||
10
|
||||
);
|
||||
RaycastUtils.
|
||||
raycast
|
||||
(
|
||||
start,
|
||||
rot,
|
||||
60,
|
||||
0.5,
|
||||
(
|
||||
point
|
||||
)
|
||||
->
|
||||
{
|
||||
World
|
||||
w =
|
||||
point.getWorld();
|
||||
if
|
||||
(
|
||||
w == null
|
||||
)
|
||||
return false;
|
||||
List
|
||||
<Entity>
|
||||
targets =
|
||||
new ArrayList
|
||||
<>
|
||||
(
|
||||
w.getNearbyEntities
|
||||
(
|
||||
point,
|
||||
0.5,
|
||||
0.5,
|
||||
0.5,
|
||||
entity
|
||||
-> {
|
||||
return
|
||||
entity
|
||||
instanceof
|
||||
LivingEntity
|
||||
living &&
|
||||
!living.isDead() &&
|
||||
living !=
|
||||
p;
|
||||
}
|
||||
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK -> {
|
||||
Location start = p.getEyeLocation();
|
||||
Vector rot = p.getLocation().getDirection().normalize();
|
||||
SoundPlayer throwSound = new SoundPlayer(p.getLocation(), Sound.ITEM_TRIDENT_RIPTIDE_3, 1,0.4F);
|
||||
throwSound.playWithin(10);
|
||||
RaycastUtils.raycast(start, rot, 60, 0.5, (point) -> {
|
||||
World w = point.getWorld();
|
||||
if (w == null) return false;
|
||||
List<Entity> targets = new ArrayList<>(w.getNearbyEntities(point, 0.5,0.5,0.5, entity -> {
|
||||
return entity instanceof LivingEntity living && !living.isDead() && living != p;
|
||||
}));
|
||||
// Create stuff here
|
||||
Particle.DustOptions dust = new Particle.DustOptions(Color.BLACK, 1);
|
||||
// Check for hits
|
||||
|
||||
)
|
||||
);
|
||||
Particle.
|
||||
DustOptions
|
||||
dust = new Particle.
|
||||
DustOptions
|
||||
(
|
||||
Color.BLACK, 1
|
||||
);
|
||||
targets.forEach(target -> {
|
||||
if (target instanceof LivingEntity living) {
|
||||
// Player hit here
|
||||
Location targetLoc = target.getLocation();
|
||||
Location originalLoc = target.getLocation().add(0,0.1,0);
|
||||
SoundPlayer bellSound = new SoundPlayer(target.getLocation(), Sound.ITEM_TRIDENT_THUNDER, 1,0.4F);
|
||||
@@ -60,7 +148,6 @@ public class VoidCharm {
|
||||
},0,1);
|
||||
}
|
||||
});
|
||||
// Every raytrace
|
||||
w.spawnParticle(Particle.REDSTONE, point, 1,0,0,0,0, dust);
|
||||
return !targets.isEmpty();
|
||||
});
|
||||
|
||||
@@ -17,9 +17,6 @@ permissions:
|
||||
oda.commands.staffchat:
|
||||
description: Access to staffchat.
|
||||
default: op
|
||||
oda.commands.socialspy:
|
||||
description: Access to socialspy.
|
||||
default: op
|
||||
oda.commands.commandspy:
|
||||
description: Access to commandspy.
|
||||
default: op
|
||||
@@ -109,17 +106,6 @@ commands:
|
||||
aliases:
|
||||
- ipearlrepair
|
||||
- irestock
|
||||
message:
|
||||
description: Private message a player
|
||||
usage: /message <player> [<message>]
|
||||
aliases:
|
||||
- msg
|
||||
- pm
|
||||
- dm
|
||||
- tell
|
||||
- whisper
|
||||
- w
|
||||
- message
|
||||
attackcooldown:
|
||||
description: Attack cooldown bypass for entities.
|
||||
usage: /attackcooldown
|
||||
|
||||
Reference in New Issue
Block a user