-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: creatorfromhell <[email protected]>
- Loading branch information
1 parent
426843d
commit 23d05b4
Showing
16 changed files
with
475 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,7 @@ Formatting: | |
Major_Separator: ',' | ||
|
||
|
||
|
||
#All configurations relating to currency notes. | ||
Note: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.NonPlayerAccount; | ||
|
||
/** | ||
* Represents an account linked to a Camp in the TNK Plugin. | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class CampAccount extends NonPlayerAccount { | ||
|
||
public CampAccount(String identifier, String name) { | ||
super(identifier, name); | ||
//this.owner = Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getKing().getUUID(); | ||
} | ||
|
||
/** | ||
* Used to get the type of account that this is. This is for data-purposes only. | ||
* | ||
* @return The account type. | ||
*/ | ||
@Override | ||
public String type() { | ||
return "kingdom"; | ||
} | ||
|
||
@Override | ||
public String generateIdentifier(String name) { | ||
|
||
try { | ||
//return Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getUUID().toString(); | ||
} catch(Exception ignore) { | ||
return super.generateIdentifier(name); | ||
} | ||
return super.generateIdentifier(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.AccountTypeCheck; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* CampCheck | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class CampCheck implements AccountTypeCheck { | ||
/** | ||
* Returns our check function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
* | ||
* @return Our function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
*/ | ||
@Override | ||
public Function<String, Boolean> check() { | ||
return value -> { | ||
try { | ||
return value.contains("camp"); | ||
} catch(Exception e) { | ||
//towny probably isn't enabled yet, or something went wrong enabling it. | ||
return false; | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.NonPlayerAccount; | ||
|
||
/** | ||
* Represents an account linked to a Kingdom in the TNK Plugin. | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class KingdomAccount extends NonPlayerAccount { | ||
|
||
public KingdomAccount(String identifier, String name) { | ||
super(identifier, name); | ||
//this.owner = Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getKing().getUUID(); | ||
} | ||
|
||
/** | ||
* Used to get the type of account that this is. This is for data-purposes only. | ||
* | ||
* @return The account type. | ||
*/ | ||
@Override | ||
public String type() { | ||
return "kingdom"; | ||
} | ||
|
||
@Override | ||
public String generateIdentifier(String name) { | ||
|
||
try { | ||
//return Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getUUID().toString(); | ||
} catch(Exception ignore) { | ||
return super.generateIdentifier(name); | ||
} | ||
return super.generateIdentifier(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.AccountTypeCheck; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* KingdomCheck | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class KingdomCheck implements AccountTypeCheck { | ||
/** | ||
* Returns our check function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
* | ||
* @return Our function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
*/ | ||
@Override | ||
public Function<String, Boolean> check() { | ||
return value -> { | ||
try { | ||
return value.contains("kingdom"); | ||
} catch(Exception e) { | ||
//towny probably isn't enabled yet, or something went wrong enabling it. | ||
return false; | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.NonPlayerAccount; | ||
|
||
/** | ||
* Represents an account linked to a Pact in the TNK Plugin. | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class PactAccount extends NonPlayerAccount { | ||
|
||
public PactAccount(String identifier, String name) { | ||
super(identifier, name); | ||
//this.owner = Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getKing().getUUID(); | ||
} | ||
|
||
/** | ||
* Used to get the type of account that this is. This is for data-purposes only. | ||
* | ||
* @return The account type. | ||
*/ | ||
@Override | ||
public String type() { | ||
return "pact"; | ||
} | ||
|
||
@Override | ||
public String generateIdentifier(String name) { | ||
|
||
try { | ||
//return Objects.requireNonNull(TownyAPI.getInstance().getNation(name)).getUUID().toString(); | ||
} catch(Exception ignore) { | ||
return super.generateIdentifier(name); | ||
} | ||
return super.generateIdentifier(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package net.tnemc.core.hook.tnk; | ||
|
||
/* | ||
* The New Economy | ||
* Copyright (C) 2022 - 2023 Daniel "creatorfromhell" Vidmar | ||
* | ||
* 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import net.tnemc.core.account.AccountTypeCheck; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* PactCheck | ||
* | ||
* @author creatorfromhell | ||
* @since 0.1.2.0 | ||
*/ | ||
public class PactCheck implements AccountTypeCheck { | ||
/** | ||
* Returns our check function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
* | ||
* @return Our function that should be used to check if a given String identifier, usually name, | ||
* is valid for this account type. | ||
*/ | ||
@Override | ||
public Function<String, Boolean> check() { | ||
return value -> { | ||
try { | ||
return value.contains("pact"); | ||
} catch(Exception e) { | ||
//towny probably isn't enabled yet, or something went wrong enabling it. | ||
return false; | ||
} | ||
}; | ||
} | ||
} |
Oops, something went wrong.