SteamWar/MissileWars
Archiviert
13
0

Update2.0 #22

Manuell gemergt
YoyoNow hat 32 Commits von Update2.0 nach master 2020-12-20 13:52:31 +01:00 zusammengeführt
7 geänderte Dateien mit 5 neuen und 34 gelöschten Zeilen
Nur Änderungen aus Commit f1e19126a9 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -21,4 +21,8 @@ package de.steamwar.misslewars.scripts;
public interface RunnableScript { public interface RunnableScript {
boolean execute(RunnableScriptEvent runnableScriptEvent); boolean execute(RunnableScriptEvent runnableScriptEvent);
interface ScriptFunction {
boolean execute(RunnableScriptEvent runnableScriptEvent, double... doubles);
}
} }

Datei anzeigen

@ -52,10 +52,7 @@ public class RunnableScriptEvent {
if (locationType == LocationType.STATIC) return location; if (locationType == LocationType.STATIC) return location;
// Dynamic Location if entity is not null // Dynamic Location if entity is not null
if (locationType == LocationType.DYNAMIC) { if (locationType == LocationType.DYNAMIC) return entity != null ? entity.getLocation() : location;
if (entity != null) return entity.getLocation();
return location;
}
// Default Location is static if EventType is onClick otherwise dynamic // Default Location is static if EventType is onClick otherwise dynamic
if (eventType == ScriptedItem.EventType.onClick) return location; if (eventType == ScriptedItem.EventType.onClick) return location;

Datei anzeigen

@ -1,26 +0,0 @@
/*
*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2020 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* /
*/
package de.steamwar.misslewars.scripts;
public interface ScriptFunction {
boolean execute(RunnableScriptEvent runnableScriptEvent, double... doubles);
}

Datei anzeigen

@ -23,7 +23,6 @@ import com.google.gson.JsonObject;
import de.steamwar.misslewars.MissileWars; import de.steamwar.misslewars.MissileWars;
import de.steamwar.misslewars.scripts.RunnableScript; import de.steamwar.misslewars.scripts.RunnableScript;
import de.steamwar.misslewars.scripts.RunnableScriptEvent; import de.steamwar.misslewars.scripts.RunnableScriptEvent;
import de.steamwar.misslewars.scripts.ScriptFunction;
import org.bukkit.Location; import org.bukkit.Location;
import java.util.HashMap; import java.util.HashMap;

Datei anzeigen

@ -23,7 +23,6 @@ import com.google.gson.JsonObject;
import de.steamwar.misslewars.scripts.RunnableScript; import de.steamwar.misslewars.scripts.RunnableScript;
import de.steamwar.misslewars.scripts.RunnableScriptEvent; import de.steamwar.misslewars.scripts.RunnableScriptEvent;
import de.steamwar.misslewars.scripts.ScriptedItem; import de.steamwar.misslewars.scripts.ScriptedItem;
import de.steamwar.misslewars.scripts.ScriptFunction;
import de.steamwar.misslewars.scripts.utils.EntityUtils; import de.steamwar.misslewars.scripts.utils.EntityUtils;
import de.steamwar.misslewars.scripts.utils.EntityUtils.ScriptShortcut; import de.steamwar.misslewars.scripts.utils.EntityUtils.ScriptShortcut;
import org.bukkit.entity.Projectile; import org.bukkit.entity.Projectile;

Datei anzeigen

@ -23,7 +23,6 @@ import com.google.gson.JsonObject;
import de.steamwar.misslewars.scripts.RunnableScript; import de.steamwar.misslewars.scripts.RunnableScript;
import de.steamwar.misslewars.scripts.RunnableScriptEvent; import de.steamwar.misslewars.scripts.RunnableScriptEvent;
import de.steamwar.misslewars.scripts.RunnableScriptEvent.LocationType; import de.steamwar.misslewars.scripts.RunnableScriptEvent.LocationType;
import de.steamwar.misslewars.scripts.ScriptFunction;
import org.bukkit.Location; import org.bukkit.Location;
import java.util.HashMap; import java.util.HashMap;

Datei anzeigen

@ -22,7 +22,6 @@ package de.steamwar.misslewars.scripts.implemented;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import de.steamwar.misslewars.scripts.RunnableScript; import de.steamwar.misslewars.scripts.RunnableScript;
import de.steamwar.misslewars.scripts.RunnableScriptEvent; import de.steamwar.misslewars.scripts.RunnableScriptEvent;
import de.steamwar.misslewars.scripts.ScriptFunction;
import de.steamwar.misslewars.scripts.utils.EntityUtils; import de.steamwar.misslewars.scripts.utils.EntityUtils;
import de.steamwar.misslewars.scripts.utils.EntityUtils.ScriptShortcut; import de.steamwar.misslewars.scripts.utils.EntityUtils.ScriptShortcut;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;