From 308ecd90e62ded32f6107cac535046cd8191a447 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 14 Oct 2019 14:12:29 +0200 Subject: [PATCH] Fixing security bug --- src/de/steamwar/bausystem/commands/CommandBau.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/de/steamwar/bausystem/commands/CommandBau.java b/src/de/steamwar/bausystem/commands/CommandBau.java index 67269f1..c9eb7f2 100644 --- a/src/de/steamwar/bausystem/commands/CommandBau.java +++ b/src/de/steamwar/bausystem/commands/CommandBau.java @@ -62,6 +62,10 @@ public class CommandBau implements CommandExecutor { if(!(sender instanceof Player)) return false; Player player = (Player) sender; + if(!BauSystem.getOwner().equals(player.getUniqueId())){ + player.sendMessage(BauSystem.PREFIX + "§cDies ist nicht deine Welt!"); + return false; + } if(args[0].equalsIgnoreCase("togglebuild")){ onToggleBD(player, args[1]);