Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Modified loan accpeting and denying
Browse files Browse the repository at this point in the history
  • Loading branch information
Flibio committed Jan 22, 2017
1 parent c87c311 commit d12800e
Show file tree
Hide file tree
Showing 55 changed files with 235 additions and 89 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=EconomyLite
owner=Flibio
inceptionYear=2015
currentYear=2016
version=2.7.0
currentYear=2017
version=2.8.0
apiVersion=5.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/github/flibio/economylite/PluginInfo.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -76,12 +76,13 @@ public void run(Player src, CommandContext args) {
if (uOpt.get()
.transfer(tOpt.get(), ecoService.getDefaultCurrency(), amount, Cause.of(NamedCause.owner(EconomyLite.getInstance())))
.getResult().equals(ResultType.SUCCESS)) {
src.sendMessage(messageStorage.getMessage("command.pay.success", "target", targetName));
Text label = ecoService.getDefaultCurrency().getPluralDisplayName();
if (amount.equals(BigDecimal.ONE)) {
label = ecoService.getDefaultCurrency().getDisplayName();
}
src.sendMessage(messageStorage.getMessage("command.pay.success", "target", Text.of(targetName), "amountandlabel",
Text.of(String.format(Locale.ENGLISH, "%,.2f", amount) + " ").toBuilder().append(label).build()));
if (target instanceof Player) {
Text label = ecoService.getDefaultCurrency().getPluralDisplayName();
if (amount.equals(BigDecimal.ONE)) {
label = ecoService.getDefaultCurrency().getDisplayName();
}
((Player) target).sendMessage(messageStorage.getMessage("command.pay.target", "amountandlabel",
Text.of(String.format(Locale.ENGLISH, "%,.2f", amount) + " ").toBuilder().append(label).build(), "sender",
uOpt.get().getDisplayName()));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of EconomyLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2016 Flibio
* Copyright (c) 2015 - 2017 Flibio
* Copyright (c) Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Loading

0 comments on commit d12800e

Please sign in to comment.