Archiviert
13
0
Dieser Commit ist enthalten in:
Yaruma3341 2020-02-02 00:22:56 +01:00
Ursprung 0eef172b86
Commit 13b0162fd4
2 geänderte Dateien mit 7 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -20,7 +20,7 @@ public class ShieldCommand implements CommandExecutor {
UserGroup userGroup = steamwarUser.getUserGroup();
if(userGroup != UserGroup.Developer &&
userGroup != UserGroup.Moderator &&
userGroup != UserGroup.Supporter &&
userGroup != UserGroup.Admin &&
userGroup != UserGroup.Youtuber) {
player.sendMessage("§cDu verfügst nicht über die benötigten Rechte!");

Datei anzeigen

@ -16,7 +16,7 @@ import java.util.Collection;
public class ShieldListener implements Listener {
double radius = 2.5D;
double radius = 2.0D;
double multiplyer = 1.1D;
float height = 1.0F;
@ -39,6 +39,9 @@ public class ShieldListener implements Listener {
if(entityPlayer.getUniqueId() == player.getUniqueId()) {
continue;
}
if(LobbyPlayer.getLobbyPlayer(entityPlayer.getUniqueId()).isShield()) {
continue;
}
world.playEffect(playerLocation, Effect.ENDER_SIGNAL, 1);
Location location = entityPlayer.getLocation();
@ -46,7 +49,7 @@ public class ShieldListener implements Listener {
double y = location.getY() - playerLocation.getY();
double z = location.getZ() - playerLocation.getZ();
entityPlayer.setVelocity(new Vector(x, y, z).multiply(multiplyer)/*.add(new Vector(0.0F, height, 0.0F))*/);
entityPlayer.setVelocity(new Vector(x, y, z).multiply(multiplyer).add(new Vector(0.0F, height, 0.0F)));
}
} else {
for(Entity entity : nearbyEntities) {
@ -67,7 +70,7 @@ public class ShieldListener implements Listener {
double y = playerLocation.getY() - location.getY();
double z = playerLocation.getZ() - location.getZ();
player.setVelocity(new Vector(x, y, z).multiply(multiplyer)/*.add(new Vector(0.0F, height, 0.0F))*/);
player.setVelocity(new Vector(x, y, z).multiply(multiplyer).add(new Vector(0.0F, height, 0.0F)));
}
}
}